package com.itfreer.notice;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;

/**
 * 定义通知类
 */
@Entity(name = "notice_info")
public class JdbcNoticeEntity implements JdbcBaseEntity<NoticeEntity>, Serializable {

	private static final long serialVersionUID = -8443497714033818376L;

	/**
	 * ID
	 */
	@Id
	@Column(name = "s_id", nullable = true)
	private String id;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	@Override
	public NoticeEntity toEntity() {
		NoticeEntity toEntity = new NoticeEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}

	@Override
	public void from(NoticeEntity t) {
		BeanUtils.copyProperties(t, this);
	}
}
